<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img{
            width: 200px;
            border-radius: 50%;
            margin: 130px;
            /* 设置原点 */
            transform-origin: left;
            
        }
        img:hover {
            transform: rotate(10000deg);
            /* 设置在这里面直接回来 */
            transition: all 15s;
        }
        audio {
            display: none;
        }
    </style>
</head>
<body>
    <!-- 行内元素无法直接旋转需要转化成行内块或者是块级 -->
    <img id="rotateImg" src="./img/cat.jpg" alt="">
    <audio id="rotateMusic" src="./music/cat.mp3"></audio>
    <!-- 以下不是学习部分 -->
    <script>
    const img = document.getElementById('rotateImg');
    const music = document.getElementById('rotateMusic');

    img.addEventListener('mouseenter', () => {
            music.play().catch(err => {
                console.log('播放失败：', err);
            });
        });
        img.addEventListener('mouseleave', () => {
            music.pause();
        })
    </script>
</body>
</html>